﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site1.Master" CodeBehind="WineStatictics.aspx.vb" Inherits="project.WineStatictics" %>

<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<br />
<br />
Number of page views:
<br />

    <asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource1" 
        Width="553px">
        <Series>
            <asp:Series Name="Series1" ChartType="Range" XValueMember="Wineid" 
                YValueMembers="CountViews" YValuesPerPoint="2">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
        SelectCommand="SELECT [CountViews], [Wineid] FROM [CountWinePageViews]">
    </asp:SqlDataSource>
    <br />
    <br />
    <br />
    Average Rating:
    <br />
    <asp:Chart ID="Chart2" runat="server" DataSourceID="SqlDataSource2" 
        style="margin-right: 206px" Width="553px">
        <Series>
            <asp:Series Name="Series1" XValueMember="Brands" YValueMembers="AverageRating">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>

    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
        SelectCommand="SELECT [Brands], [AverageRating] FROM [WiAVG]">
    </asp:SqlDataSource>

    <br />
    <br />
</asp:Content>
